The present invention relates to a new process for the preparation of (S)-N-tert-butyl-1,2,3,4-tetrahydroisoquinoline-3-carboxamide whose formula of structure is here below reported 
and which is a key intermediate for the preparation of compounds having elevated pharmacological activity, which can be used in particular in the treatment and in the prevention of infections caused by HIV. In the greatest part of said antiviral drugs the (S)-N-tert-butyl-1,2,3,4-tetrahydroisoquinoline-3-carboxamide is not used directly as such but, contrarily is previously hydrogenated to form the N-tert-butyl-decahydro-(4aS,8aS)isoquinolin-3(S)-carboxamide whose formula of structure is here below reported 
and by suitable substitutions at the isoquinoline nitrogen which will be obvious to any person skilled in the art is in turn converted into the pharmacologically active derivative.
In U.S. Pat. No. 5,196,438, herein incorporated as a reference, pharmacologically active compounds are disclosed whose formula of structure is here below reported 
and in which the decahydroisoquinoline residue derived from the N-tert-butyl-decahydro-(4aS,8aS)-isoquinolin-3(S)-carboxamide is immediately identifiable; among these, the derivative of most interest, and the structural formula of which is given below 
is known by the commercial name Saquinavir.
Another anti-viral drug of substantial importance, which also contains the decahydroisoquinoline residue present in Saquinavir, is Nelfinavir, the structural formula of which is likewise given below 
Both Nelfinavir and Saquinavir are normally used in the form of the corresponding water-soluble salts and, in particular, in the form of the mesylated salts.
In U.S. Pat. No. 5,587,481 it is described a process for the manufacture of the (S)-N-tert-butyl-1,2-3,4-tetrahydroisoquinoline-3-carboxamide wherein the (3S)-1,2,3,4-tetrahydroisoquinoline-3-carboxylic acid 
is reacted with phosgene in ethyl acetate to produce the corresponding N-carboxyanhydride (NCA), here below reported 
The NCA is then directly reacted with tert-butylamine and subsequently hydrogenated to give the N-tert-butyl-decahydro-(4aS,8aS)-isoquinolin-3(S)-carboxamide The process disclosed in U.S. Pat. No. 5,587,481 is however characterized by drawbacks which cannot be neglected as low yields and, in particular, the fact of using phosgene, which is a toxic and highly dangerous gas.
European Patent Application EP 751128 describes a similar synthesis process in which the conversion of the (3S)-1,2,3,4-tetrahydroisoquinoline-3-carboxylic acid into the corresponding NCA can be effected also with triphosgene. The advantages resulting from this process are clear because the use of triphosgene which, unlike phosgene, is not a toxic gas, permits complete safety of implementation with a consequent saving in operating costs and plant costs; triphosgene is also a solid compound which enables it to be used more accurately and therefore without the typical secondary reactions which may occur with the use of a gaseous reagent in excess.
Finally, the Italian patent application MI98A001478 filed on Jun. 26, 1998, describes an implemented process for the synthesis of the (S)-N-tert-butyl-1,2,3,4-tetrahydroisoquinoline-3-carboxamide characterized in that the (3S)-1,2,3,4-tetrahydroisoquinoline-3-carboxylic acid is reacted with triphosgene in dioxane making it possible to obtain particularly high global yields also on an industrial scale.
Both U.S. Pat. No. 5,587,481, EP-751128 and MI98A001478 present the common feature that the reaction between NCA and tert-butylamine is carried out at a starting temperature higher than xe2x88x9220xc2x0 C.
It has now been surprisingly found and it is the object of the present invention, that by carrying out the reaction between tert-butylamine and the NCA at a starting temperature lower than xe2x88x9230xc2x0 C., preferably lower than xe2x88x9250xc2x0 C., the (S)-N-tert-butyl-1,2,3,4-tetrahydroisoquinoline-3-carboxamide is produced with a yield and a purity definitely higher than those obtainable by carrying out the reaction according to the previously described methods. In particular, as it will be appreciated by the following examples, the reaction carried out according to the present invention permits the obtainment of the (S)-N-tert-butyl-1,2,3,4-tetrahydroisoquinoline-3-carboxamide with yields of 15-20% higher than those obtainable by operating at a starting temperature higher than xe2x88x9220xc2x0 C. Furthermore, the reaction between tert-butylamine and the NCA carried out according to the previously described methods produces a dimer by-product, whose formula is here below reported 
which is on the contrary produced in substantially reduced amounts if operating according to the method of the present invention.
The reaction between NCA and tert-butylamine is carried out in an inert organic solvent, preferably toluene, THF, dioxane, methylene chloride, using from 1 to 10 moles of tert-butylamine, preferably from 3 to 5 moles, for each mole of NCA.
The NCA is generally suspended in 5-10 liters of solvent for 1 kg of NCA. The so-obtained suspension is then normally cooled to a temperature lower than xe2x88x9250xc2x0 C., preferably at a temperature comprised between xe2x88x9280-xe2x88x9250xc2x0 C., more preferably at xe2x88x9275-xe2x88x9265xc2x0 C. The tert-butylamine is then added maintaining the temperature below xe2x88x9250xc2x0 C., preferably below xe2x88x9255xc2x0 C.; the temperature is then raised until room temperature and maintained as such until completion of the reaction.
The method for the manufacture of the NCA is not limiting for the purposes of the present invention and can be carried out according to the several methods reported in literature; the preferred method is however that disclosed in MI98A001478 and wherein the (3S)-1,2,3,4-tetrahydroisoquinoline-3-carboxylic acid is reacted with triphosgene in dioxane at a starting concentration of 0.5-1.5 m/l with 0.3-1.2 equivalents of triphosgene and at temperatures between +20 and +85xc2x0 C.
In the preferred embodiment of the invention, the NCA thus obtained is not isolated; on the contrary, the solvent of the previous reaction is distilled off and the raw NCA is then directly suspended in the reaction solvent, preferably in toluene; normally 3000-5000 liters of solvent, preferably 3500-4500, are used for 500 kg of (3S)-1,2,3,4-tetrahydroisoquinoline-3-carboxylic acid. The reaction mixture is then cooled to about xe2x88x9270xc2x0 C. and the tert-butylamine is then added dropwise into the solution for a time period of 20-40 minutes, maintaining the temperature below xe2x88x9255xc2x0 C.; the temperature is then raised to about xe2x88x9220xc2x0 C. in 20-40 minutes and it is then raised to +15-+20xc2x0 C. in 20-40 minutes. The temperature is then maintained as such for about 2 hours and water is added afterwards in order to quench the reaction.
The end product is then isolated in accordance with conventional techniques; preferably it is precipitated from acidic water by addition of a base, generally soda.
The (S)-N-tert-butyl-1,2-3,4-tetrahydroisoquinoline-3-carboxamide can then be hydrogenated to N-tert-butyl-decahydro-(4aS,8aS)-isoquinoline-3(S)-carboxamide in accordance with conventional techniques as those described in U.S. Pat. No. 5,256,783, U.S. Pat. No. 5,587,481, EP-751128 and MI98A001478, herein incorporated as a reference; the reaction is normally carried out in an organic polar solvent, preferably an alcohol, even more preferably isopropanol, in the presence of a reduction catalyst in heterogeneous phase, preferably rhodium supported on alumina.